package com.cqs.learning.spring.cloud.producer.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author lixw
 * @Date 6/2/20 8:10 AM
 */
@Configuration
@MapperScan("com.cqs.learning.spring.cloud.producer.mapper")
public class MybatisConfig {


    /**
     * 翻页生效
     *
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
        paginationInterceptor.setLimit(50);
        return paginationInterceptor;
    }
}
